package com.swsc.xapp.xroom;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.RawQuery;
import androidx.sqlite.db.SupportSQLiteQuery;

import java.util.List;

@Dao
public interface PvDeviceInfoDao extends BaseDao<PvDeviceInfoDO>{

    @Query("SELECT * FROM solar_device_info WHERE id IN (:id)")
    PvDeviceInfoDO getById(Long id);

    @Query("DELETE FROM solar_device_info WHERE tenant_no = :tenantNo AND organ_no =:organNo")
    void deleteByTenantOrgan(Integer tenantNo, Integer organNo);

    @Override
    default String getTableName() {
        return "solar_device_info";
    }
}
